import { http } from '@/utils/http'
import type { BannerItem, CateegoryItem, HotItem, GuessItem } from '@/types/home'
import type { PageParams, PageResult } from '@/types/global'
// 首页轮播图
export const getBannerAPI = (distributionSite = 1) => {
  return http<BannerItem[]>({
    method: 'GET',
    url: '/home/banner',
    data: { distributionSite },
  })
}
//前台分类
export const getHomeCategoryAPI = () => {
  return http<CateegoryItem[]>({
    method: 'GET',
    url: '/home/category/mutli',
  })
}
//热门推荐
export const getHomeHotAPI = () => {
  return http<HotItem[]>({
    method: 'GET',
    url: '/home/hot/mutli',
  })
}
//猜你喜欢
export const getguessLikeAPI = (data: PageParams) => {
  return http<PageResult<GuessItem>>({
    method: 'GET',
    url: '/home/goods/guessLike',
    data,
  })
}
